package com.ehotting.mqbd.zw.api.domain.netty;


import com.ehotting.eaf.core.text.UUID;
import com.ehotting.eaf.core.utils.ByteUtils;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class ZwCommPacketHead{
        /**
         * 对方Id
         * ZwUint32
         */
        private int peerId = 0xFFFFFFFF;
        /**
         * 应答的包ID
         * ZwUint32
         */
        private int peerPackId = UUID.fastUUID().hashCode();
        /**
         * 数据buffer大小
         * ZwUint32
         */
        private int bufSize;
        /**
         * 命令
         * ZwUint16
         */
        private short cmd;
        /**
         * 数据包属性
         * Unsigned char
         * C语言中char是8位
         */
        private byte packProp = ByteUtils.bitStrToByte("00000000");
        /**
         * 命令属性
         * Unsigned char
         * C语言中char是8位
         */
        private byte cmdProp = ByteUtils.bitStrToByte("00000001");
    }